﻿@model IEnumerable<MLManagement.Models.Transaction>
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
    var grid = new WebGrid(Model, defaultSort: "TransactionId", rowsPerPage: 50);

}
<div class="well">
    <h3>
        <p class="muted">
            Transacciones</p>
    </h3>
</div>
<p>
    @using (Html.BeginForm())
    {
        <input class="btn btn-info" type="submit" name="submit" value="Agregar Transaccion" />       
    }
</p>
@grid.GetHtml(
        tableStyle: "well",
        alternatingRowStyle: "alert alert-info",
        columns: grid.Columns(
                    grid.Column(null, "Id",format: item => Html.ActionLink((string)item.TransactionId.ToString(), "Details", new { id = item.TransactionId })), 
                    grid.Column("CurrentCustomer", "Cliente"),
                    grid.Column("CurrentProduct", "Producto"),
                    grid.Column("Date", "Fecha"),
                    grid.Column("Username", "Realizada por")
                    )
                 
    )
